﻿#region Using declarations
using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Strategy;
#endregion

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    partial class Strategy
    {
        ///Year on specified calendar date, in short form (last 2 or 3 digits of year)
        ///Returns the year (YYY) portion of the specified calendar date.
        ///Syntax: Year(cDate);
        ///cDate: numeric expression for the date in YYMMDD or YYYMMDD format.
        public int Year(int cDate)
        {
            return (int)Floor(cDate / 10000);
        }

    }
}
